{% extends 'blogs/base.html' %}
{% block title %}
	{{ entry.blog.name }}
{% endblock %}
{% block blogname %}{{ entry.blog.name }}{% endblock %}
{% block blogdesc %}{{ entry.blog.description }}{% endblock %}
{% block append_css %}
<style type="text/css" media="screen">
	.content {
		width: 100%;
		overflow: auto;
	}
	.content .entry {
		border: 1px solid #FFFFFF;
		border-left: none;
		width: 80%;
		margin-bottom: 20px;
	}
	.content .entry h2 {
		color: #8C0A89;
		margin-left: 0px;
	}
	.content .entry h2 span {
		border: 1px solid #FFFFFF;
		border-left: none;
		padding-left: 20px;
		padding-right: 20px;
		font-size: larger;
	}
	.content .entry .meta {
		font-size: small;
		color: #444444;
		text-align: center;
	}
	.content .entry p {
		padding: 10px;
	}
	.content .entry_actions {
		border: 1px solid #FFFFFF;
		border-left: none;
		float: left;
		margin: 0 0 20px 0;
		padding: 5px;
		overflow: auto;
	}
	.content .entry_actions ul {
		margin: 5px;
	}
	.content .entry_actions ul li {
		float: left;
		margin-right: 20px;
	}
	.content .entry_comments .comment {
		clear: left;
		width: 65%;
	}
	
</style>

{% endblock %}
{% block content %}
	<div class="content">
		<div class="entry">
			<h2><span>{{ entry.title }}</span></h2>
			<div class="meta">{{ entry.datetime }}
			, by {{ entry.blog.owner }}</div>
			<p>{{ entry.text }}</p>
		</div>
		<div class="entry_actions">
			<ul>
				<li><a href="comment/">comment it</a></li>
			{% ifequal user.username entry.blog.owner.username %}
				<li><a href="../../edit/{{ entry.id }}/">edit</a></li>
				<li><a href="../../delete/{{ entry.id }}/">delete</a></li> 
			{% endifequal %}
			</ul>
		</div>
		{% if entry.comment_set %}
		<div class="entry_comments">
			{% for comment in entry.comment_set.all %}
			<div class="comment">
				<h3>{{ comment.title }}</h3>
				<div class="meta">
					<span>{{ comment.commenter }} written at 
					 {{ comment.datetime }}</span>
	 			</div>
				<div>
				</div>
				<p>{{ comment.text }}</p>
			</div>
			{% endfor %}
		</div>		
		{% endif %}
	</div>
{% endblock %}

